3.454 \(\int (a+b \sec ^3(e+f x)) \tan (e+f x) \, dx\)

Optimal. Leaf size=30 \[ \frac{b \sec ^3(e+f x)}{3 f}-\frac{a \log (\cos (e+f x))}{f} \]

[Out]

-((a*Log[Cos[e + f*x]])/f) + (b*Sec[e + f*x]^3)/(3*f)

________________________________________________________________________________________

Rubi [A]  time = 0.023017, antiderivative size = 30, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 19, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.105, Rules used = {4138, 14} \[ \frac{b \sec ^3(e+f x)}{3 f}-\frac{a \log (\cos (e+f x))}{f} \]

Antiderivative was successfully verified.

[In]

Int[(a + b*Sec[e + f*x]^3)*Tan[e + f*x],x]

[Out]

-((a*Log[Cos[e + f*x]])/f) + (b*Sec[e + f*x]^3)/(3*f)

Rule 4138

Int[((a_) + (b_.)*sec[(e_.) + (f_.)*(x_)]^(n_))^(p_.)*tan[(e_.) + (f_.)*(x_)]^(m_.), x_Symbol] :> Module[{ff =
 FreeFactors[Cos[e + f*x], x]}, -Dist[(f*ff^(m + n*p - 1))^(-1), Subst[Int[((1 - ff^2*x^2)^((m - 1)/2)*(b + a*
(ff*x)^n)^p)/x^(m + n*p), x], x, Cos[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f, n}, x] && IntegerQ[(m - 1)/2] &&
IntegerQ[n] && IntegerQ[p]

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rubi steps

\begin{align*} \int \left (a+b \sec ^3(e+f x)\right ) \tan (e+f x) \, dx &=-\frac{\operatorname{Subst}\left (\int \frac{b+a x^3}{x^4} \, dx,x,\cos (e+f x)\right )}{f}\\ &=-\frac{\operatorname{Subst}\left (\int \left (\frac{b}{x^4}+\frac{a}{x}\right ) \, dx,x,\cos (e+f x)\right )}{f}\\ &=-\frac{a \log (\cos (e+f x))}{f}+\frac{b \sec ^3(e+f x)}{3 f}\\ \end{align*}

Mathematica [A]  time = 0.0134052, size = 30, normalized size = 1. \[ \frac{b \sec ^3(e+f x)}{3 f}-\frac{a \log (\cos (e+f x))}{f} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + b*Sec[e + f*x]^3)*Tan[e + f*x],x]

[Out]

-((a*Log[Cos[e + f*x]])/f) + (b*Sec[e + f*x]^3)/(3*f)

________________________________________________________________________________________

Maple [A]  time = 0.02, size = 28, normalized size = 0.9 \begin{align*}{\frac{b \left ( \sec \left ( fx+e \right ) \right ) ^{3}}{3\,f}}+{\frac{a\ln \left ( \sec \left ( fx+e \right ) \right ) }{f}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*sec(f*x+e)^3)*tan(f*x+e),x)

[Out]

1/3*b*sec(f*x+e)^3/f+1/f*a*ln(sec(f*x+e))

________________________________________________________________________________________

Maxima [A]  time = 1.03585, size = 38, normalized size = 1.27 \begin{align*} -\frac{a \log \left (\cos \left (f x + e\right )^{3}\right ) - \frac{b}{\cos \left (f x + e\right )^{3}}}{3 \, f} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sec(f*x+e)^3)*tan(f*x+e),x, algorithm="maxima")

[Out]

-1/3*(a*log(cos(f*x + e)^3) - b/cos(f*x + e)^3)/f

________________________________________________________________________________________

Fricas [A]  time = 0.508701, size = 93, normalized size = 3.1 \begin{align*} -\frac{3 \, a \cos \left (f x + e\right )^{3} \log \left (-\cos \left (f x + e\right )\right ) - b}{3 \, f \cos \left (f x + e\right )^{3}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sec(f*x+e)^3)*tan(f*x+e),x, algorithm="fricas")

[Out]

-1/3*(3*a*cos(f*x + e)^3*log(-cos(f*x + e)) - b)/(f*cos(f*x + e)^3)

________________________________________________________________________________________

Sympy [A]  time = 2.32186, size = 42, normalized size = 1.4 \begin{align*} \begin{cases} \frac{a \log{\left (\tan ^{2}{\left (e + f x \right )} + 1 \right )}}{2 f} + \frac{b \sec ^{3}{\left (e + f x \right )}}{3 f} & \text{for}\: f \neq 0 \\x \left (a + b \sec ^{3}{\left (e \right )}\right ) \tan{\left (e \right )} & \text{otherwise} \end{cases} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sec(f*x+e)**3)*tan(f*x+e),x)

[Out]

Piecewise((a*log(tan(e + f*x)**2 + 1)/(2*f) + b*sec(e + f*x)**3/(3*f), Ne(f, 0)), (x*(a + b*sec(e)**3)*tan(e),
 True))

________________________________________________________________________________________

Giac [B]  time = 1.30283, size = 262, normalized size = 8.73 \begin{align*} \frac{6 \, a \log \left (-\frac{\cos \left (f x + e\right ) - 1}{\cos \left (f x + e\right ) + 1} + 1\right ) - 6 \, a \log \left ({\left | -\frac{\cos \left (f x + e\right ) - 1}{\cos \left (f x + e\right ) + 1} - 1 \right |}\right ) + \frac{11 \, a + 4 \, b + \frac{33 \, a{\left (\cos \left (f x + e\right ) - 1\right )}}{\cos \left (f x + e\right ) + 1} + \frac{33 \, a{\left (\cos \left (f x + e\right ) - 1\right )}^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} + \frac{12 \, b{\left (\cos \left (f x + e\right ) - 1\right )}^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} + \frac{11 \, a{\left (\cos \left (f x + e\right ) - 1\right )}^{3}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{3}}}{{\left (\frac{\cos \left (f x + e\right ) - 1}{\cos \left (f x + e\right ) + 1} + 1\right )}^{3}}}{6 \, f} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sec(f*x+e)^3)*tan(f*x+e),x, algorithm="giac")

[Out]

1/6*(6*a*log(-(cos(f*x + e) - 1)/(cos(f*x + e) + 1) + 1) - 6*a*log(abs(-(cos(f*x + e) - 1)/(cos(f*x + e) + 1)
- 1)) + (11*a + 4*b + 33*a*(cos(f*x + e) - 1)/(cos(f*x + e) + 1) + 33*a*(cos(f*x + e) - 1)^2/(cos(f*x + e) + 1
)^2 + 12*b*(cos(f*x + e) - 1)^2/(cos(f*x + e) + 1)^2 + 11*a*(cos(f*x + e) - 1)^3/(cos(f*x + e) + 1)^3)/((cos(f
*x + e) - 1)/(cos(f*x + e) + 1) + 1)^3)/f